#include "IceLinkPool.h"

using namespace cm_nat;

int main()
{
    IceLinkPool pool;
    SocketAddress stunSa("stunserver.org", 3478);
    pool.setHostIP( IPAddress("192.168.0.128") );
    pool.setup(3, stunSa );


    std::string a;
    while(1)
    {
        std::cin>> a;
        IceLink* p_link = pool.getLink();
        if( p_link ){
            std::cout<<"\n"<<p_link->getStunReflexAddress().toString();
        }
    }

    return 0;
}